/**
 * Copyright (c) Jan 21, 2013 1:42:52 PM WKM and/or its affiliates. 
 * Use is subject to license terms.
 * All rights reserved.
 */
package org.extblog.wkm.web.util;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Controller;

/**
 * @author WKM 获取spring的context
 * ApplicationContextUtil.java history
 * 1.WKM - Jan 21, 2013 - Create File
 */
@Controller
public class ApplicationContextUtil implements ApplicationContextAware{

	/** spring context **/
	private static ApplicationContext applicationContext = null;
	
	/**
	 * 获取spring context
	 * @return
	 */
	public static ApplicationContext getApplicationContext(){
		return applicationContext;
	}
	
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		// TODO Auto-generated method stub
		ApplicationContextUtil.applicationContext = applicationContext;
	}

}
